


How to Hide Hits

by GoldenFalls



Category: No Fandom
Genre: Ao3 Tutorial, Fanwork Research & Reference Guides, Other, Skin Explanation
Language: English
Status: Completed
Published: 2018-03-14
Updated: 2018-03-14
Packaged: 2019-03-23 19:24:36
Rating: General Audiences
Warnings: No Archive Warnings Apply
Chapters: 2
Words: 740
Publisher: archiveofourown.org
Story URL: https://archiveofourown.org/works/13794576
Author URL: https://archiveofourown.org/users/GoldenFalls/pseuds/GoldenFalls
Summary: Currently, it's possible to hide hits through your Preferences page, but because of caching weirdness this sometimes doesn't work. Here's how you can hide hits from yourself using site skins, which don't have that issue.





	1. Instructions

**Summary for the Chapter:**

> This chapter will instruct you on how to hide hit counts (from yourself) using a site skin. It's as simple as clicking, making up a title, and copy and pasting!

In order to make a skin, you first need to go to the "[Create Site Skin](https://archiveofourown.org/skins/new?skin_type=Skin)" page (click that link or navigate to it by going to the Skins section of your dashboard menu (it's right under Preferences) and clicking on the "My Site Skins" button, then the "Create Site Skin" button in the top right.). Now, just make up a title (it has to be unique/not used previously by any users, so I like to title my skins fun stuff like "Hitman Hits the Hit Counts"), and paste the following code in the CSS text box: 

> .wrapper .hits {  
>  display: none;  
>  }
> 
> ul.sorting li:nth-of-type(3) {  
>  display: none;  
>  }  
> 

Click the submit button at the bottom right of the page, then click use. And presto, all hit counts should be hidden! They won't show up when viewing your own works, other people's works, bookmarks, or your Statistics page. The one thing it's not going to affect is the experience of other users: you can't hide hits on your works from other users by using a site skin, so they will still be able to see hit counts on your works. While there's no way for me to replicate that Preferences option, I hope removing hit counts from their own view will still give some people peace of mind and improve their experiences. 

(Additionally, if you just want to hide hits on your own works, you can use the following code instead: `.own dl.stats .hits {display: none;} .work .wrapper .hits {display: none;} ul.sorting li:nth-of-type(3) {display: none;}` I might edit the next chapter later to explain the code, but basically it hides hits in blurbs on only your works, and hides all hits you see when you click on a work since there isn't the ability to select for only what's your own there, as well as hiding the hits on your statistics page. This will keep you from ever seeing hits on your own works, but still let you view hits on other works while browsing and the like.) 

The only other limitation I can think of is the general considerations for site skins: if you want to use another site skin in the future, you'll have to create a new skin with the code for both skins copy and pasted into it. 

Otherwise, enjoy a hit-free AO3!

**Notes for the Chapter:**

> Explanation of the code in the next chapter (it's pretty short).
> 
> I welcome any comments! If you have questions, would like to point out errors/potential improvements, or just want to comment on the skin or the impetus behind it, please let me know below!


	2. Code Explanation

**Summary for the Chapter:**

> Explaining the code.

The first thing you need to know is that `display: none` hides whatever it's applied to. Let's look at the two things this skin applies it to: 

  1. `.wrapper .hits`
  2. `ul.sorting li:nth-of-type(3)`



The first is the part that targets all the hit counts on work blurbs (what's displayed when you're browsing or looking at people's works and bookmarks, the info above a fic when you're reading, etc.) as well as the section of your Statistics page that summarizes how many hits you have. These different types of blurbs are made of different code, but they all are inside of HTML tags with the class "wrapper". This means we can target all those blurbs by just targeting that class, and we don't have to specify each blurb individually.

If we just left it at that, our skin would hide a lot more than the hits. Fortunately, the parts of the blurbs that display hits have the class "hits" so we can narrow it down and only hide the hits in the blurbs.

So this code: `.wrapper .hits {display: none;}` says, "Hide anything in the class 'wrapper' that also has the class 'hits'."

The second part is a bit more complicated to explain. `ul.sorting li:nth-of-type(3)` targets the hits graph and ranking section of your Statistics page. It does so by hiding the button which selects hits to sort by. Since AO3's code doesn't uses classes to distinguish what each button refers to and my attempts to get around that by selecting for attributes instead failed, the button has to be singled out by specifying it's order in the row of buttons. (A friend helped me with this part, thanks!) `ul.sorting` specifies that the button is in the unordered list with the class "sorting" (aka the row of buttons that select which statistic you're viewing), and `li:nth-of-type(3)` says that it's the third item on that list (the third button). Because we're specific about which list we're referring to, we can avoid the skin unintentionally hiding the third item in other lists on the archive.

**Notes for the Chapter:**

> If you have any questions or suggestions, please leave them in the comments below!


End file.
